﻿<%@ Page Title="添加/修改企业用户-首家汽车行业人才测评系统" Language="C#" MasterPageFile="~/System/SiteSystem.Master"
    AutoEventWireup="true" CodeBehind="AddEnterpriseUser.aspx.cs" Inherits="EvaluationSystem.AddEnterpriseUser" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
        function Check() {
            var ulogin = document.getElementById("MainContent_UserName");
            var cNM = document.getElementById("MainContent_CompanyName");

            if (ulogin.value == "") {
                alert("请输入用户名(英文)");
                return false;
            }

            if (cNM.value == "") {
                alert("请输入公司名称！");
                return false;
            }
        }
    </script>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <table width="80%" border="0" align="center" class="maintable">
        <tr>
            <td align="center" colspan="2">
                <asp:Label ID="lblTitle" runat="server" Style="margin-left: 0px" Width="167px"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">用户名:</asp:Label>
            </td>
            <td class="style1" align="left">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:TextBox ID="UserName" AutoPostBack="true" runat="server" class="input" OnTextChanged="UserName_TextChanged"></asp:TextBox>
                        </td>
                        <td align="left">
                            <asp:Label ID="lblMessage" ForeColor="red" runat="server"></asp:Label>
                            <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                ErrorMessage="必须填写“用户名”。" ToolTip="必须填写“用户名”。" ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                        </td>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="UserName" EventName="TextChanged" />
                    </Triggers>
                </asp:UpdatePanel>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">密码:</asp:Label>
            </td>
            <td class="style1">
                <asp:TextBox ID="Password" runat="server" class="input"></asp:TextBox>
                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                    ErrorMessage="必须填写“密码”。" ToolTip="必须填写“密码”。" ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">确认密码:</asp:Label>
            </td>
            <td class="style1">
                <asp:TextBox ID="ConfirmPassword" runat="server" class="input"></asp:TextBox>
                <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword"
                    ErrorMessage="必须填写“确认密码”。" ToolTip="必须填写“确认密码”。" ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="CompanyNameLabel" runat="server">公司名称:</asp:Label>
            </td>
            <td class="style1">
                <asp:TextBox ID="CompanyName" runat="server" class="input"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="Label1" runat="server">联系人:</asp:Label>
            </td>
            <td class="style1">
                <asp:TextBox ID="txtbContact" runat="server" class="input"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="Label2" runat="server">联系电话:</asp:Label>
            </td>
            <td class="style1">
                <asp:TextBox ID="txtbPhone" runat="server" class="input"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="2" class="style4">
                <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                    ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="“密码”和“确认密码”必须匹配。"
                    ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
                <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" class="bluebtn" />
                <asp:Button ID="btnCancel" runat="server" Text="返回" OnClick="btnCancel_Click" class="bluebtn" />
            </td>
        </tr>
        <tr>
            <td align="center" colspan="2" style="color: Red;">
                <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
            </td>
        </tr>
    </table>
</asp:Content>
